save name and id in array