Refactor read() method and add readFrom() method