some more refactoring....