add better url reconstruction and param builder