grid optimization.