Solved assignment 3.4