Solved assignment 2.