code review and modify