If the point of this is to turn the key into an integer for Card.find, Card.find will already convert strings to integers so you might not need to do this.