compute numerical gradient added