Bit of refactoring to make this more readable