added memory sharing for monomials