added mod 6 explanation