Made a sort function for deck