implemented the reader