allocation and deallocation mostly work