constructor of CardsInfo can sort cards correctly