fixed up a few things in the optim file