refactoring for URL