switch to encodeUriComponent to handle url params

fixes #38