one or two minor refinements here and there