some more refinements to ml