add an algorithm Dec 20th