better template and edit text with d3