redesign the api of class StringData