adding threading cleaning