reworked ResourceManager