implemented Monomial class