Updated to work with SRV records