Move encodeURIcomponent, add number to query