cleaning up a reference