implemented my network connection type detection