refactoring recommendation code