completely changed the resmgr nt concept (it compiles but will not work)t