fixed problem with word-order switching with 'swap' helper method