Assignment2 solved