added an old version of the swap example