added implimentation for read