add test.c with example of usage