changed cell updating code