reorganize for lib