updating data structure