Threaded simulation and new code