Added the functions needed to calculate the tip amounts.