change to pluginfile function