added alternate gradient calculation to ricochet