added if, else if, and else statements