Added rotate list code