cleaned up calculation of target value situation
new local d3