creating a class for partitioner