changed algo from manual to eval