Changed the implementation of Monomial