modify roation function to excluded speical case, good