refactoring code changes