more refactoring..