added custom urlencode to fix #27