added GridToXYZ