transformation to cos