starting to work on getting d3 functionality close to original example script