Adding 2 kinds of rotation algorithm
Hybrid approach of rotation algorithm