cleaner way of setting host