simpler logic for getting the data-id