Added the weak reference exercise from chapter 3