Update cards.py add docstrings