Start of second alg