work on calculating the subnet