update changed function