added subdomain functionality