scripts to handle plugin