all done, seems to work

needs more extensive testing, and handling for EOS
need to implement other readerlike functions