code refactoring: code cleanup