cleaned code, started on prob 2.