refactor + resources plugin