sanitizing params to api call