improve resource loading