Added guard clauses