- Added subnet handling code