add two algorithms Oct 28th