updated closed loop control