added getLength() method to TextStore