converting to c
copy in other test code to start converting to c