added swap 2 code and moved swap 1 code to new directory