added code to c and added 3 files