finished the card controller