refine the library