refactoring in dhcp_manager