all 4 algos now work