add an algorithm Dec 11th