changed structure of params function