partially stable implementation