change rotation calculation