removing thread stuff