Working on problem 2d - taking a dinner break.
Some more changes. Currently working on 2d