inserted function on utils to encode raw urls