refactored reader impl