updated uri parsing