adapted to the new resource loading system