added c and c++ versions of the stupid paper alg, and tried to fix it. STILL VERY VERY BROKEN