changed the optimization function, changed the initial condition to be such that equal encounter probability enforces equal distance