created if statement to see if the total is less then 30