done subproblem 1