Added some code to processCard()