add two algorithms Dec 14th