Added if, else if, and else statement.