change setPathAndQuery to setUri