some changes from code review