do get threads function