adjust rotation code - replace y axis with zaxis