first version of read, seems to be working