further moving code around for DHCP issue