c solver working