Added an if statement