testing method for strings