emulate pread