Ok, i will make a procedure out of it. 

It is working for any coefficient rings I was working: Z2tom, Zptom, Zn (n not prime).