gradient checking sort of works, but error is too large