combine theta code with fixed policy, add code for timing sweeping phase