added adaptive lambda selection