added logic to switch on net inf