routines for testing how in and output are sampled