refactoring url class