split up C code