Add control and regression code