implemented control via keys