cleanup getGridIds methods