add method to reverse words in a string + associated tests