Solved homework #3