added more debugging printlines