add getlines, getbinary functions