added some testing routines