replaced Object.keys with d3.keys