changed c3 to use int instead of long long int