Solved assignment 2