multiple changes and code refactoring