Assignment 4 solved