adds the sort function i accidentally deleted i am doing well today