Adding in gradient check of h function