There are two of these clauses - refactor so there's only one?