add libraries a plugin event and some functionalities