minor changes to sample, removed un-used "spin" variable