changed an if statement