hw1 workin on prob 2