apply code review feedback from @jjallaire