read function, just reads, no writes