compute all factors