Add semi working control code