modified myprograms.cpp