first commit for c implimentation