nit: remove the extra space between `function` and `(key, params)..`