encapsulate card extraction logic