refactoring uri extensions