improve d3 externs