First version of the program