updated read() method