add cosine interpolation