simplifiy url logic