code refactoring...