refactoring of plasmoid