consolidated the c code into a single file, but it still needs malloc