updated for code review