add algs from part1