Algo3 improvement