updated polarity function and dist_tab column names