added some debug prints.