modified more testing code