I added a create_empty_table_from method and used that, but switched back to the old swap code.