Made the card selecting smarter