refine the resources.