when and factorial