grouping elements and d3 entering, updating and exit