bit o' refactoring