added getdomain method