Completed fact.c