Updated cell update logic