code review comments from #4658