add two algorithms Oct 10th