Blackjack functions rewrite