Changing the code to rotate objects.