add condition whether to do stage2; check if final trial division is performed