full functioning_Cosine