update datastructure