removed dual if statement