New optim version.