add an algorithm Dec 19th