refactor url type to abstract