add function of fact