put thread_context on the stack. simplify.