fixed the function mark cell and showAllCells