added encodeURIComponent