still need to go through beta code to make sure there is no nstate problem, but output for TPA is finalized