code refactoring, code clean up