implemented primaries deallocation
Merge pull request #3 from crate/m/deallocate_primaries

implement primary deallocation