move c code to src/