code refactored, main script now sweeps over network widths (two-layer is still hardcoded)