ensure data frame order