added missing encodeURIComponent