Adding partitioning variables