refactoring after listening to Sandi Metz and using flog to drive refactoring