Added swap method.