refactor uri