fixing algos