added some debugging print statements