minor changes to algos