do changes suggested by @taldcroft in the discussion of #909