finishe everything but copying new thetas back into memory