Solving code after code review