sample.c fixed