no need to explicitly cast thread_id to int