minor review, compute the url only once.