refactor blackjack