improved url encoding