Functions for the new threas table, script for updating this table