Factorial using ranges added