created function for logging cards in list