Swapper homework exercise