hacking away at core C code