ground work for prob3 done, i.e. functions needed to solve.  just need to set up actual question