Solved assignment 3.