added some debug printf