Rewrited using string instead of vector.