added in some routines to test noise, etc.