reverting a string