support for swapping weights