add an algorithm Dec 3rd