497 -added debug messages