added new constructor
added read functionality