refactoring for reading