got to a working state with real optimization going on...
vectorized the optimization iteration factor of 5 speed increase for pure calculation...