Not working unless cellCount is defined when initialized