param grids can be passed in externally
merge fix