add two algorithms Oct24th