COSINE case added to switch. useCosine() implemented.