add function reverseWords, first implementation