refactored resource loading to reduce collisions