changed code to use DHCP