Successfully solved this portion of homework