remove encode()/ decode() and replace by node-url package