restructured the control system slightly