first pass at implementing the reader