Created assigncards function.  Almost fixed the bug but not quite