Updated the base case and added description of the problem