added dtor and reset and operator=