remove trds from the function