solve rotate list problem