added name and idx to new elements in history