made deconstructor more efficient