add an algorithm Dec 6th