refactored netlist.h