exception added to factorial