add license, simplfy urlencode