put bounds on the calculations for ll to make L-BFGS-B happy