threshold_logic js library added