advanced implementation of control loop