test routines added to code