add an algorithm Dec 29th