minimal changes due to code review