replaced escape with encodeURI