Created respective functions for rotating depending on the requirements

Bug for turning around