read until no more to read