work on stabilization algorithm