continue work on weak reference and avoid memory leak