refactor processresources collector