Added swap() shell function