TODO: added some ideas for debugging the C code