Added functionality to choose host