readding column reordering code