updates for sorting of cards