adding the solution for the first homework