added dynamic-esk number of grouping