optimized optional clauses