working out where I am going wrong in my cleanup