refactor the Reader