Change the function of the if statement to else if statement