creates program that computes the factorial