buffered read - untested...