avoid double reading of resources