cleanup of capacity computation
introduced indexType