extract uri to path method