multithreaded, cleanup up