adding already computed rotations into the gradient computation
Former-commit-id: 52bbec23e4b61e74ead57f81e078261b4f38b180