added code to display the # of swaps in the console