main of card prog