refine some implementations of the framework