support dynamic count and size