make next and previous rotate