Updated with test problems.