apply some minor changes coming from @ph review