modify after code review