initial commit of working program

This is the first version of the program, it works.