edit dealloc method