dl minimization function added