I was comparing my worng answers with the worked solutions I had on another piece of paper. I couldn't follow their method since they were doing some odd stuff with moduli (not that odd now i'm comparing it with correct answers ).