grid equations updated to remove extreme max and min values