main cpp file

problems 3 - 7