added test for getCards function