ajax receiving and sorting done