shrink array when needed
implement Subset