x_i is dim p NOT k