refactored for reading