kill the main thread