fixed so that last_updated and history_size is updated when a new data point is stored