code review changes part 1 (untested)