finished all controll functions