subdomain script partly redone