removed printlines and unnecessary output