On associativity of graded Algebras