completed ResourceManager (yet to test)