fixed the error in which gem swapping was working incorrectly. There is a typo in the book in which "-n" should be "--n" (the prefix decrement operator rather than negative n)