Controlls logic added