added deallocator to object