wrapped data in an anonymous function and styled it using d3