Added the ability to assign an id for each item and retrieve the ids of the selected items