minor refactoring..