Switch to if statement