Add functionality to reverse words in a string.