final version of read() method. No recursion