Algorithm, lighting of buttons work