invert string completed