Working dinamically for d3