code to combine NSA table and RC3 table
updated SB formula