added numerical gradient, gradient checking