corrects if/else statement