refine data manipulation slightly.