more refactoring 2