slight change to output in gradient testing
moved around functions