refactor url build