Add constructor method for string reader