Added things for threads