Added swap list function