add an algorithm Dec 16th