add plugin code for RMinimizer