changing Mem[read|write]Engine interfaces to bytes