added read method to reader class