First version of control program