cards: quite finished all base functions