tighter integration with d3
minor changes