made addCards function