fix function and add plugins