modified max_count