refine the framework