merged C code