added sample.c for testing