improved guard clauses