fix this logic on per hostname basis