Letter swap function works