constructor and destructor work