reverses a string