Added potential solution in response to the subgoals.