refine library interface