finished swap case exercise