updating data sorting
fixed all the sorting