Changed renderCards function