finished most of prob2, main points done with some imperfections in style