add end to if statement