Part B - first half

Haven’t figured out plotting and needs some comments