migrated partitioner to streaming approach