changes to algo