more infrastructure for gregory patches