switching to C code again