updating to use the element to fetch the id