regularized gradient calculations implemented and submitted