simplify reading into memory