Code with partitioner