correcting errors from code review