simplify swap