Completed problem B