refactoring blackjack