update dbchanged function