added domain check