add smart uri parsing