added some debug prints