added some debug statements