refactor url