Final version of programm