added read functionality