Change algo for calfflac