to find the factorial