handle if clauses