declared total and assiged to calculation and added return to return the total