refactored web based blackjack