change format from scope to resources
refactoring