implemented gradient checking
implemented gradient checking