C test code working