working tree generate method