Start implementing alg