added debug printlines