added a greatest common denominator step to rotations
split rotations into a separate file