some refinements to ag