move lib to plugin