This is some of the programming i did to figure out problem two