use custom params to build query string

if you provided custom param names these weren't being used to build the
query string previously