made read(..) method public for testing