Finished the overall algorithm
Finished the algorithms