reverse string modified