completed equation for factorial calculation.