Improved if/else statement