Updated make url function