rework of resource manager