modifie CellCount and PosCells, try to improve perf, need more work on PosCells