refactor absolute url resolving into separate module