utility.js for coding with d3 style