added some debugging printouts