Adding solution for homework1