Added functions to choose host to hash