working hw1, finished prob 1