added if/else statement