small refactor for urls