convert if/else to standalone if.