C code for module 2 project