more refactoring ..