simple version of read implemented