some changes

CalculateCosC could work now