had to change the "next" so that it is encoded for url.