added exception checking and make sure I don't double up ids in name container