Tried fitting some models to problem 3, problem 2 code needs a lot of clean up