finishing endpoints and interface with optim methods...
finishing endpoints and interface with optim methods...