Changes to sample.c