moved cachedHeights to superclass