Started working on sort function