add an algorithm Dec 13th