Updated plugin script