Use `RefCell` to capture mutable varable in different closures