added explanation for problem 2 second part