Algo3 Tested completely