made the cosine transform more accurate