Changes to cosine function