Problem set up and pseudo coding