changed monomial deletion code