rework according to code review