refactored resource_source