remove if/else