added read whole package determined by terminator