better testing for gradients using helper lib