[cyril] made cell hashable and use dictionary to store cells.