Finished the other two algortihms, done with this problem for now.