moved some functionality to Reader class