programatically specificy host