complete the flow minor tweek needed
improving subdomain function