Added a factory method to data reader class.