finished base draft of MLNNV.optimize() method