control.cpp added