added an example and fixed the string method.