merge by updating the algorithm 2 with the constant lambda