more refactoring leading to #cleanCode