optimizer if condition