new function is_last determines if a card is the last of its kind