#5 - subproblem C complete