if/else conditions simplified