factorial without collector