get rid of the precomputed gradient case