added primary_ip method