use weakref.proxy instead of weakref.ref