adding if, else if, else statement