refactoring, an apple engineer looked at this code woop!