change calcSubnet()