refactoring to dry up some more