Changed params from an array to an object