added a more general n_twoports_2_nport for ntwk building