changes to sample.c