changed cell initial value to cell_min instead of 0