the first version of string class (implements some basic function)