print card details function