added if/else