partitioner implementation