updating code to c