change and add an algorithm Oct 3rd