code refactoring changes