finished first three problems of hw4