Added checkgrad - numerical gradient check