Adding  own optimizer.