amend: use argument-dependent lookup for swap