added a few needed inits swap_table and spt