Minor note, there's a more elegant way to write this, I think you can just do `Array(params).each`, it will make an array of params if params is not an array.