correctly encoing uri