iadded destructor. added abillity to track memory.