almost done with updated algs