First version of the program in one go.