blackjack refactored