generic approach for generating network inputs