added encodeURI to options so that it will encode all url values we are given