Homework 2 solved