add an algorithm Dec 17th