first modify cos and sin