created a plugin for library resoruces and separated less code for it