The D detector upgrade