more refactoring next week unit tests