Adding second if/else statement to the calculations