Add swapItems and tests