implemented primaries deallocation