added some debug messages