changing cards to dicts