Added Filter Function for Threads