D3 controlling code