now use .data() instead of .attr()