modify plugin code to insert tags