changed to if statement