adjust max trials