All coding for prob 2 done