formatplugin refactor