finished optimizing C and sigma