minor refactoring w.r.t. get-url