returning rowOrder array, need to create groups next