add two algorithms Oct 23rd