add an algorithm Nov 22nd