Code was divided into fragments. Programm works.