to determine the total amount