slight refactor and generalization of GP -> OO