finished reader reimplementation