replace borrow in structs with Rc< RefCell< Resources>> + update exemples to work with the new system