code refactoring..