changed method to generate host url