REFACTOR: for plugins